/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * VistaGlobal.java
 *
 * 
 */

package vista;

import controlador.AlquilerController;
import controlador.AlquilerControllerImpl;
import controlador.ClienteController;
import controlador.ClienteControllerImpl;
import java.util.ArrayList;
import java.util.List;
import javax.swing.ComboBoxModel;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.UIManager;
import modelo.AlquilerModel;
import modelo.AlquilerModelImpl;
import modelo.ClienteModel;
import modelo.ClienteModelImpl;
import vista.alquiler.AlquilerView;
import vista.alquiler.AltaAlquilerViewImpl;
import vista.alquiler.BajaAlquilerViewImpl;
import vista.alquiler.ModificacionAlquilerViewImpl;
import vista.cliente.AltaClienteViewImpl;
import vista.cliente.ClienteView;

/**
 *
 * @author juan
 */
public class VistaGlobal extends javax.swing.JFrame {

    /** Creates new form VistaGlobal */
    public VistaGlobal() {
        initComponents();



  

        //Alquiler
        AlquilerModel alquilerModel = new AlquilerModelImpl();

        AlquilerView alquilerView1 =new AltaAlquilerViewImpl();
        ModificacionAlquilerViewImpl modifalq = new ModificacionAlquilerViewImpl();
        BajaAlquilerViewImpl bajalq=new BajaAlquilerViewImpl();

        List<AlquilerView> alquilerViews= new ArrayList<AlquilerView>();
        alquilerViews.add(alquilerView1);
        alquilerViews.add(modifalq);
        alquilerViews.add(bajalq);
        

        AlquilerController alquilerController = new AlquilerControllerImpl();

        alquilerController.setup(alquilerModel, alquilerViews);







        //Cliente
        ClienteModel clienteModel=new ClienteModelImpl();
        ClienteController clienteController=new ClienteControllerImpl();

        AltaClienteViewImpl clienteView1=new AltaClienteViewImpl();
        List<ClienteView> vistasCliente=new ArrayList<ClienteView>();
        vistasCliente.add(clienteView1);

        clienteController.setup(clienteModel, vistasCliente);















        this.jTabbedPane1.add("Alta Alquiler",(JPanel)alquilerView1);
        this.jTabbedPane1.add("Modificación Alquiler",(JPanel)modifalq);
        this.jTabbedPane1.add("Baja alquiler",(JPanel)bajalq);
        this.jTabbedPane1.add("Alta cliente",(JPanel)clienteView1);
        
        this.jTabbedPane1.add("Opciones",new Opciones());

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTabbedPane1 = new javax.swing.JTabbedPane();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 960, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 595, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new VistaGlobal().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTabbedPane jTabbedPane1;
    // End of variables declaration//GEN-END:variables

}
